package com.feinno.urcs.group.entity;

import com.feinno.superpojo.SuperPojo;
import com.feinno.superpojo.annotation.Field;
import com.feinno.urcs.types.MobileNo;

/**
 * @author Li.Hongbo <lihongbo@feinno.com>
 */
public class GroupTextOfflineMessage extends SuperPojo {
    @Field(id = 1)
    private MobileNo receiver;
    @Field(id = 2)
    private int groupId;
    @Field(id = 3)
    private GroupOfflineMessageIndex offlineMessageIndex;

    public GroupTextMessageStorageEntity getGroupTextMessageStorage() {
        return groupTextMessageStorage;
    }

    public void setGroupTextMessageStorage(GroupTextMessageStorageEntity groupTextMessageStorage) {
        this.groupTextMessageStorage = groupTextMessageStorage;
    }

    @Field(id = 4)
    private GroupTextMessageStorageEntity groupTextMessageStorage;

    public GroupTextOfflineMessage() {
    }

    public GroupTextOfflineMessage(MobileNo receiver, int groupId, GroupOfflineMessageIndex offlineMessageIndex, GroupTextMessageStorageEntity entity) {
        this.receiver = receiver;
        this.groupId = groupId;
        this.offlineMessageIndex = offlineMessageIndex;
        this.groupTextMessageStorage = entity;
    }

    public MobileNo getReceiver() {
        return receiver;
    }

    public void setReceiver(MobileNo receiver) {
        this.receiver = receiver;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public GroupOfflineMessageIndex getOfflineMessageIndex() {
        return offlineMessageIndex;
    }

    public void setOfflineMessageIndex(GroupOfflineMessageIndex offlineMessageIndex) {
        this.offlineMessageIndex = offlineMessageIndex;
    }



    public String getContentType() {
        return groupTextMessageStorage.getTextContentType();
    }

    public byte[] getContent() {
        return groupTextMessageStorage.getTextContent();
    }

    public long getGroupMessageStorageId() {
        return groupTextMessageStorage.getGroupMessageId();
    }
}
